package com.gemframework.util;

import ma.glasnost.orika.MapperFacade;
import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.impl.DefaultMapperFactory;

public class OrikaBeanUtil {

    private static MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
    private static MapperFacade mapperFacade = mapperFactory.getMapperFacade();

    public static <S, T> T convert(S s, Class<T> clazz) {
        return mapperFacade.map(s, clazz);
    }
}
